import { Column, Entity,  PrimaryGeneratedColumn } from "typeorm";
// import { UserInfo } from "./user.entity";

@Entity()
/**支付订单 */
export class PaidOrder{
    @PrimaryGeneratedColumn({type:'int',name:'id',comment:"用户自增id"})
    id:number;

    @Column('varchar',{length:32,comment:"商户单号"})
    ordersn:string;

    @Column('varchar',{length:32,comment:"微信支付单号"})
    transaction_id:string;

    @Column('varchar',{length:12,comment:"支付者userid"})
    userid:number;

    @Column('varchar',{length:128,comment:"支付者openid"})
    openid:string;

    @Column({type:'decimal',scale:2,comment:"付款金额"})
    price:number;

    @Column({type:'int',comment:"添加时间戳"})
    addtime:number;

    @Column({type:'int',comment:"支付时间戳"})
    lasttime:number;

    @Column({type:'int',comment:"支付的时间"})
    paytime:number;

    @Column('varchar',{length:30,comment:"支付状态"})
    status:string;

    @Column({type:'int',comment:"项目Id"})
    partnerId:number;

    // @OneToOne(type => UserInfo)
    // @JoinColumn()
    // user:UserInfo;
}